Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Check if project is a MicroProfile, Qute, etc project to map file with a language server #1188

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

angelozerr
Copy link
Contributor

@angelozerr angelozerr commented Oct 1, 2023

feat: Check if project is a MicroProfile, Qute, etc project to map file with a language server

Fixes #850
Fixes #1121

This PR provides a new API DocumentMatcher which is used to match the document with a language server. This matcher is called if the file language is mapped with a language server. Once language is matched, teh document filter is processed to have more robust filter:

  • for properties file, we check the name of properties files which fixes Quarkus completion is available in all *.properties files in a Quarkus project #1121
  • for Java file, we check that the file belong to a Quarkus / Qute project. It means that if you have a java project which is not a Qute / Quarkus project, language server should never started
  • for HTML files, we check that html files belongs to templates folder and belong to a Qute project.

The DocumentMatcher is used for the moment only when file is opened,it means if we add / remove a Qute / Quarkus dependency, it will change nothing. You will need to close all files and reoping it. @fbricon perhaps we could see that in an another PR?

@sonarcloud
Copy link

sonarcloud bot commented Oct 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@angelozerr
Copy link
Contributor Author

CI build is working!

@angelozerr angelozerr merged commit af5c507 into redhat-developer:main Oct 3, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant